//
//  MyWalletDetailListCell.m
//  OnionHome
//
//  Created by fengjie on 2019/9/14.
//  Copyright © 2019 FengJie. All rights reserved.
//

#import "MyWalletDetailListCell.h"

@interface MyWalletDetailListCell ()
/**<#属性#>*/
@property (nonatomic,strong)UILabel*leftTopName;
/**<#属性#>*/
@property (nonatomic,strong)UILabel*leftBotmName;
/**<#属性#>*/
@property (nonatomic,strong)UILabel*rightName;
@end

@implementation MyWalletDetailListCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        [self createUI];
    }
    return self;
}
-(void)setBalanceDic:(NSDictionary *)balanceDic{
    _balanceDic = balanceDic;
    self.leftTopName.text = balanceDic[@"leftTopName"];
    self.leftBotmName.text = balanceDic[@"leftBomName"];
    self.rightName.text = balanceDic[@"rightName"];
}
-(void)createUI{
    [self addSubview:self.leftTopName];
    [self addSubview:self.leftBotmName];
    [self addSubview:self.rightName];
    
    [self.leftTopName mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(16);
        make.top.mas_equalTo(16);
    }];
    [self.leftBotmName mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(16);
        make.top.mas_equalTo(self.leftTopName.mas_bottom).offset(8);
        make.bottom.mas_equalTo(-16);
    }];
    [self.rightName mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.mas_equalTo(0);
        make.right.mas_equalTo(-16);
    }];
}

#pragma mark --懒加载
-(UILabel*)leftTopName{
    if(!_leftTopName){
        _leftTopName=[UILabel new];
        _leftTopName.textColor = UIColorFromRGB(0x273323);
        _leftTopName.font = PingFangSC_Medium(16);
        _leftTopName.text = @"充值-微信支付";
    }
    return _leftTopName;
}

-(UILabel*)leftBotmName{
    if(!_leftBotmName){
        _leftBotmName=[UILabel new];
        _leftBotmName.textColor = UIColorFromRGB(0x959E97);
        _leftBotmName.font = SYSTEMFONT(14);
        _leftBotmName.text = @"2018-01-01 12:30:00";
    }
    return _leftBotmName;
}

-(UILabel*)rightName{
    if(!_rightName){
        _rightName=[UILabel new];
        _rightName.textColor = UIColorFromRGB(0x009966);
        _rightName.font = PingFangSC_Medium(18);
        _rightName.text = @"+400";
    }
    return _rightName;
}
@end
